package com.xyh.flowershop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xyh.flowershop.domain.Order;
import com.xyh.flowershop.vo.req.orders.OrderPageReqVo;
import com.xyh.flowershop.vo.resp.order.OrderPageRespVo;
import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
* @author 10728
* @description 针对表【tb_order】的数据库操作Mapper
* @createDate 2024-05-12 21:34:37
* @Entity com.xyh.flowershop.domain.Order
*/
public interface OrderMapper extends BaseMapper<Order> {


    int removeOrders(List<String> ids);


    List<Order> selectByIds(List<String> ids);

    void cancelOrders(List<String> ids);

    IPage<OrderPageRespVo> findPageOrders(IPage<OrderPageRespVo> page, @Param("vo") OrderPageReqVo vo);

    @Update("update tb_order set order_status = #{code} where id = #{id}")
    int updateOrderStatus(@Param("id") String id, @Param("code") Integer code);
}




